<%@page contentType="text/html" pageEncoding="UTF-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@include file="_include.jsp" %>
<html>
<%--路径 /forum/test--%>
<head>
    <script src="${pageContext.request.contextPath}/resources/js/jquery-2.1.1.js"></script>
    <%--<script src="/forum/resources/js/jquery-2.1.1.js"></script>--%>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>test</title>
</head>
<body>
<h1>test</h1>

<div name="弹出登录框 测试">

    <a href="javascript:;" onclick="popShow()">login</a>

    <div id="popup_box" style="display: none">
        <p>this is a cool popup</p>
        <a id="popup_close" onclick="popHide()" href="javascript:;">close</a>
    </div>
</div>

<br/><br/>

<div name="js 测试">
    <a href="javascript:;">a标签href="javascript:;"</a><br/>
    <a href="javascript:;" onclick='fn()'>a标签 href="javascript:;" onclick='fn()'</a><br/>
    <a href="javascript:void(0)" onclick='fn()'>a标签 href="javascript:void(0)" onclick='fn()'</a><br/>
</div>

<%--文件上传--%>
<div name="文件上传 测试">

    <%--单个文件上传--%>
    <p>-------自己文件上传------</p>

    <form method="POST" action="/forum/test/uploadFileSelf" enctype="multipart/form-data">
        File to upload: <input type="file" name="file"><br/>
        Name: <input type="text" name="name"><br/>
        <input type="submit" value="Upload">
    </form>
    <br/><br/>

    <%--单个文件上传--%>
    <p>-------单个文件上传------</p>

    <form method="POST" action="/forum/test/uploadFile" enctype="multipart/form-data">
        File to upload: <input type="file" name="file"><br/>
        Name: <input type="text" name="name"><br/>
        <input type="submit" value="Upload"> Press here to upload the file!
    </form>
    <br/><br/>


    <%--多个文件上传--%>
    <p>-----多个文件上传-------</p>

    <form method="POST" action="/forum/test/uploadMultipleFile" enctype="multipart/form-data">
        File1 to upload: <input type="file" name="file"><br/>
        Name1: <input type="text" name="name"><br/> <br/>
        File2 to upload: <input type="file" name="file"><br/>
        Name2: <input type="text" name="name"><br/> <br/>
        <input type="submit" value="Upload"> Press here to upload the file!
    </form>
    <br/><br/>
</div>


<script type="text/javascript">
    function fn() {
        console.log('fn is called');
    }

    // 弹出框
    function popShow() {
        console.log('popShow');
        $('#popup_box').fadeIn('slow');
    }
    function popHide() {
        console.log('popShow');
        $('#popup_box').fadeOut('slow');
    }
</script>
</body>
</html>
